home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C++
/
Applications
/
nanoInstall 1.0
/
source
/
standardgetfile.cp
< prev
next >
Wrap
Text File
|
1996-07-05
|
1KB
|
61 lines
#include <Finder.h>
#include <StandardFile.h>
#include <Threads.h>
#include "standardfile_.h"
#include "standardgetfile.h"
standardgetfile::standardgetfile( OSType thetype, short dlogID)
: standardfile( dlogID)
{
setTypes( &thetype, 1);
}
standardgetfile::standardgetfile( OSType *thetypes, long numtypes, short dlogID)
: standardfile( dlogID)
{
setTypes( thetypes, numtypes);
}
standardgetfile::~standardgetfile()
{
delete theTypes;
}
void standardgetfile::changeTypes( OSType *thetypes, long numtypes)
{
delete theTypes;
setTypes( thetypes, numtypes);
}
Boolean standardgetfile::doIt()
{
Point where = { -1, -1};
CustomGetFile(
0L,
numTypes,
theTypes,
(StandardFileReply *)this,
DLOG_ID,
where,
0L,
0L,
0L,
0L,
(void *)this // Ptr yourDataPtr
);
return sfGood;
}
void standardgetfile::setTypes( OSType *thetypes, long numtypes)
{
theTypes = new OSType[ numtypes];
numTypes = numtypes;
for( int i = 0; i < numtypes; i++)
{
theTypes[ i] = thetypes[ i];
}
}